package com.itheima.d18_extends_demo;

public class Animal {
    private String name;
    private String color;
    private int price;

    public Animal(){}
    public Animal(String name,String color,int price){
        this.name = name;
        this.color = color;
        this.price = price;
    }

    public void setName(String name){
        this.name = name;
    }
    public void setColor(String color){
        this.color =color;
    }
    public void setPrice(int price){
        this.price = price;
    }

    public String getName(){
        return name;
    }
    public String getColor(){
        return color;
    }
    public int getPrice(){
        return price;
    }


    public void eat(){
        System.out.println("动物在吃饭~~~~");
    }

    public void work(){
        System.out.println("动物在工作~~~~~");
    }

}
